package com.wangijun.yuan.core.domain;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.wangijun.yuan.core.model.em.NoticeTypeEnum;
import io.swagger.v3.oas.annotations.media.Schema;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 通知信息表
 */
@Schema(description = "通知信息表")
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "notice_info")
public class NoticeInfo implements Serializable {
    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @Schema(description = "主键")
    private Long id;

    /**
     * 发起通知的用户Id
     */
    @TableField(value = "create_user_id")
    @Schema(description = "发起通知的用户Id")
    private Long createUserId;

    /**
     * 接收通知的用户Id
     */
    @TableField(value = "receive_user_id")
    @Schema(description = "接收通知的用户Id")
    private Long receiveUserId;

    /**
     * 通知类型
     */
    @TableField(value = "notice_type")
    @Schema(description = "通知类型")
    private NoticeTypeEnum noticeType;

    /**
     * 通知状态，0未通知，1已通知
     */
    @TableField(value = "notice_flag")
    @Schema(description = "通知状态，0未通知，1已通知")
    private Integer noticeFlag;

    /**
     * 文章ID
     */
    @TableField(value = "art_id")
    @Schema(description = "文章ID")
    private Long artId;

    /**
     * 评论ID
     */
    @TableField(value = "comment_id")
    @Schema(description = "评论ID")
    private Long commentId;

    /**
     * 标签ID
     */
    @TableField(value = "tag_id")
    @Schema(description = "标签ID")
    private Long tagId;

    /**
     * 话题ID
     */
    @TableField(value = "topic_id")
    @Schema(description = "话题ID")
    private Long topicId;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    @Schema(description = "创建时间")
    private LocalDateTime createTime;

    /**
     * 年度
     */
    @TableField(value = "`year`")
    @Schema(description = "年度")
    private Integer year;
    @Serial
    private static final long serialVersionUID = 1L;
}